// 前台路由
const express = require('express');
const router = express.Router();

const indexController = require('../controllers/indexController');


//首页
router.get('/',indexController.index);

//登录界面
router.get('/login',indexController.loginPage)


router.post('/login',indexController.login)

//注册界面
router.get('/register',indexController.registerPage)


//文章详情页
router.get('/detail/:id',indexController.detailPage);


//发布文章
router.get('/create',indexController.createArtical)
router.post('/create',indexController.sendArtical)


module.exports = router;